package lab02.test06;

public class Triangle {
    double a;
    double b;
    double c;
    double perimier;
    double area;
    boolean Triangle;

    public void setValue(double a, double b, double c) {
        this.a = a;
        this.b = b;
        this.c = c;
    }

    public void perimer() {

        perimier = (a + b + c) / 2;
        System.out.println("三角形周长是：" + perimier);
    }

    public void area() {
        area = (double) Math.sqrt(perimier * (perimier - a)
                * (perimier - b) * (perimier - c));
        System.out.println("三角形面积是：" + area);
    }

    public boolean Triangle() {
        if (a + b > c && a + c > b && b + c > a) {
            return true;
        } else {
            return false;
        }

    }
}
